<!DOCTYPE html>
<html ng-app="myApp" ng-controller="inputServiceProviderController" xmlns:th="http://www.thymeleaf.org">
<head th:include="/common/head :: commonHead('编辑供应商')"></head>
<body>
<div style="height: 20px;"></div>
<div  data-ng-init="load()" style="width: 90%; margin: 0 auto;">
    <form lay-filter="inputForm" class="layui-form" action="">

        <input id="serviceId" type="hidden" th:value="${serviceId}" />
        <div class="layui-form-item">
            <label class="layui-form-label">供应商全称</label>
            <div class="layui-input-block">
                <input ng-model="entity.service_name" type="text" name="service_name" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">供应商类型</label>
            <div class="layui-input-block">
                <input ng-model="entity.service_type" type="radio" name="service_type" value="1" title="正式" >
                <input ng-model="entity.service_type" type="radio" name="service_type" value="2" title="临时">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">供应商状态</label>
            <div class="layui-input-block">
                <input ng-model="entity.service_status" type="radio" name="status" value="1" title="正常" >
                <input ng-model="entity.service_status" type="radio" name="status" value="0" title="禁用">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">联系人</label>
                <div class="layui-input-inline">
                    <input ng-model="entity.contact_name" lay-verify="required"  type="text" name="contact_name" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label style="width: 120px;" class="layui-form-label">联系人手机</label>
                <div class="layui-input-inline">
                    <input maxlength="11" ng-model="entity.contact_mobile" type="tel" name="contact_mobile" lay-verify="required|phone" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">供应商服务</label>
            <div id="serviceTypeDiv" class="layui-input-block">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">服务范围</label>
            <div class="layui-input-inline">
                <select lay-filter="serviceArea" id="serviceArea" name="area">
                    <option value="">请选择</option>
                </select>
            </div>
        </div>
        <div style="padding-left: 50px; margin-bottom: 20px;" >
            <button type="button" ng-click="delArea($index)" ng-repeat="area in serviceAreaList" class="layui-btn layui-btn-normal">
                <i class="layui-icon">&#xe640;</i> {{area}}
            </button>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">收款人名称</label>
                <div class="layui-input-inline">
                    <input ng-model="entity.account_name" type="text" name="account_name" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label style="width: 120px;" class="layui-form-label">收款人证件号</label>
                <div class="layui-input-inline">
                    <input maxlength="18" ng-model="entity.account_idnumber" type="text" name="identity" lay-verify="identity" placeholder="" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">收款银行</label>
                <div class="layui-input-inline">
                    <input ng-model="entity.account_bank" type="text" name="account_bank" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label style="width: 120px;" class="layui-form-label">收款银行帐号</label>
                <div class="layui-input-inline">
                    <input ng-model="entity.account_bank_no" type="text" name="account_bank_no" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">收款人类型</label>
            <div class="layui-input-block">
                <input ng-model="entity.account_type" type="radio" name="account_type" value="1" title="个人">
                <input ng-model="entity.account_type" type="radio" name="account_type" value="2" title="企业">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <button type="button" class="layui-btn" id="licenseImgUploadBtn">上传供应商营业执照照片</button>
                <input type="hidden" id="img_license" ng-model="entity.img_license">
                <div class="layui-upload-list">
                    <img style="height: 250px;width: 200px;" ng-src="{{entity.img_license}}" class="layui-upload-img" id="licenseImg">
                    <p id="licenseImgUploadCue"></p>
                </div>
            </div>
            <div style="margin-left: 210px;" class="layui-inline">
                <button type="button" class="layui-btn" id="qualificationImgUploadBtn">上传供应商资质照片</button>
                <input type="hidden" id="img_qualification" ng-model="entity.img_qualification">
                <div class="layui-upload-list">
                    <img style="height: 250px;width: 200px;" ng-src="{{entity.img_qualification}}" class="layui-upload-img" id="qualificationImg">
                    <p id="qualificationImgUploadCue"></p>
                </div>
            </div>
        </div>



        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">供应商介绍</label>
            <div class="layui-input-block">
                <textarea ng-model="entity.service_intro" placeholder="请输入内容" class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">门户网站</label>
            <div class="layui-input-block">
                <input ng-model="entity.service_website" type="text" name="url" lay-verify="url" autocomplete="off" class="layui-input">
            </div>
        </div>
        <input type="hidden" id="btnSubmit" ng-click="submit($event)">
    </form>
</div>
<span th:replace="/common/on-load-js :: commonOnLoadJs"></span>
<span th:replace="/common/angular :: angular"></span>
</body>
<script src="/static/admin/js/serviceProvider/input.js"></script>
</html>